import 'package:after_sale_plugin/common/pdf_preview/controller.dart';
import 'package:after_sale_plugin/common/pdf_preview/view.dart';
import 'package:after_sale_plugin/pages/edit_order/controller.dart';
import 'package:after_sale_plugin/pages/edit_order/view.dart';
import 'package:after_sale_plugin/pages/order_detail/controller.dart';
import 'package:after_sale_plugin/pages/order_detail/view.dart';
import 'package:after_sale_plugin/pages/order_history/controller.dart';
import 'package:after_sale_plugin/pages/order_history/view.dart';
import 'package:after_sale_plugin/pages/problem_resolution/controller.dart';
import 'package:after_sale_plugin/pages/problem_resolution/view.dart';
import 'package:after_sale_plugin/pages/product_manual/controller.dart';
import 'package:after_sale_plugin/pages/product_manual/view.dart';
import 'package:get/get.dart';

import 'common/area_code/controller.dart';
import 'common/area_code/view.dart';

abstract class Routes {
  // 一键报修-编辑工单
  static const editOrder = '/';

  // 工单详情-查看工单
  static const orderDetail = '/order_detail';

  // 工单-问题方案
  static const problemResolution = '/problem_resolution';

  // 工单-历史列表
  static const historyList = '/history_list';

  // 产品手册
  static const productManual = '/product_manual';

  // 国家code
  static const countryCode = '/country_code';

  // pdf预览
  static const pdfPreview = '/pdf_preview';
}

class AfterSalePages {
  static final List<GetPage> routes = [
    GetPage(
      name: Routes.editOrder,
      page: () => EditOrderView(),
      binding: BindingsBuilder(
        () {
          Get.lazyPut(() => EditOrderController());
        },
      ),
      transition: Transition.rightToLeft,
    ),
    GetPage(
      name: Routes.orderDetail,
      page: () => OrderDetailView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => OrderDetailController());
      }),
      transition: Transition.rightToLeft,
    ),
    GetPage(
      name: Routes.countryCode,
      page: () => AreaListView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => AreaListController());
      }),
      transition: Transition.rightToLeft,
    ),
    GetPage(
      name: Routes.problemResolution,
      page: () => ProblemResolutionlView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ProblemResolutionController());
      }),
      transition: Transition.rightToLeft,
    ),
    GetPage(
      name: Routes.historyList,
      page: () => OrderHistoryListView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => OrderHistoryListController());
      }),
      transition: Transition.rightToLeft,
    ),
    GetPage(
      name: Routes.productManual,
      page: () => ProductManualView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ProductManualController());
      }),
      transition: Transition.rightToLeft,
    ),
    GetPage(
      name: Routes.pdfPreview,
      page: () => PdfPreviewView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => PdfPreviewController());
      }),
      transition: Transition.rightToLeft,
    ),
  ];
}
